<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/mytable/Fk_reimlist.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Fk_reimlist.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'reimlist_id',
                footer: "Foots",
                cnName: '费用明细',
                name: 'mytable/Fk_reimlist',
                url: "/Fk_reimlist/",
                sortName: "reimlist_id"
            });
            const editFormFields = ref({"rcntr":"","fei_type":"","fzdate":"","tax":"","ws_je":"","je":"","tickno":"","cc_bdate":"","cc_edate":"","t_num":"","r_num":"","b_dd":"","e_dd":"","bz_je":"","jt_tax":"","jt_je":"","zz_tax":"","zz_je":"","other_tax":"","other_je":"","tick_type":"","remark":""});
            const editFormOptions = ref([[{"title":"出差起时间","field":"cc_bdate","type":"date"},
                               {"title":"出差止时间","field":"cc_edate","type":"date"},
                               {"title":"天数","field":"t_num","type":"decimal"},
                               {"title":"人数","field":"r_num","type":"number"},
                               {"title":"起地","field":"b_dd","type":"text"},
                               {"title":"止地","field":"e_dd","type":"text"},
                               {"title":"补助金","field":"bz_je","type":"decimal"},
                               {"title":"交通费-税金","field":"jt_tax","type":"decimal"},
                               {"title":"交通费-金额(不含税)","field":"jt_je","type":"decimal"},
                               {"title":"住宿费-税金","field":"zz_tax","type":"decimal"},
                               {"title":"住宿费-金额(不含税)","field":"zz_je","type":"decimal"},
                               {"title":"其他费-税金","field":"other_tax","type":"decimal"},
                               {"title":"其他费-金额(不含税)","field":"other_je","type":"decimal"},
                               {"dataKey":"pj_typelist","data":[],"title":"发票类别","field":"tick_type","type":"select"},
                               {"dataKey":"cntr","data":[],"title":"成本中心/研发项目","field":"rcntr","type":"select"},
                               {"dataKey":"fei_typelist","data":[],"title":"科目","field":"fei_type","type":"select"},
                               {"title":"发票日期","field":"fzdate","type":"date"},
                               {"title":"税额","field":"tax","type":"decimal"},
                               {"title":"未税金额","field":"ws_je","disabled":true,"type":"decimal"},
                               {"title":"金额(含税)","field":"je","type":"decimal"},
                               {"title":"票号","field":"tickno","type":"text"},
                               {"title":"备注","field":"remark","type":"textarea"}]]);
            const searchFormFields = ref({"rcntr":"","fei_type":"","fzdate":"","tax":"","je":"","tickno":"","remark":""});
            const searchFormOptions = ref([[{"dataKey":"cntr","data":[],"title":"成本中心/研发项目","field":"rcntr","type":"select"},{"dataKey":"fei_typelist","data":[],"title":"科目","field":"fei_type","type":"select"},{"title":"发票日期","field":"fzdate","type":"date"},{"title":"税额","field":"tax","type":"decimal"},{"title":"金额(含税)","field":"je","type":"decimal"},{"title":"票号","field":"tickno","type":"text"},{"title":"备注","field":"remark","type":"text"}]]);
            const columns = ref([{field:'rcntr',title:'成本中心/研发项目',type:'string',bind:{ key:'cntr',data:[]},width:180,align:'left',sort:true},
                       {field:'fei_type',title:'科目',type:'string',bind:{ key:'fei_typelist',data:[]},width:180,align:'left'},
                       {field:'fzdate',title:'发票日期',type:'datetime',width:110,align:'left',sort:true},
                       {field:'tax',title:'税额',type:'decimal',width:110,align:'left'},
                       {field:'ws_je',title:'未税金额',type:'decimal',width:110,readonly:true,align:'left'},
                       {field:'je',title:'金额(含税)',type:'decimal',width:100,align:'left'},
                       {field:'reimlist_id',title:'reimlist_id',type:'int',width:80,hidden:true,require:true,align:'left'},
                       {field:'reim_id',title:'reim_id',type:'int',width:80,hidden:true,align:'left'},
                       {field:'tickno',title:'票号',type:'string',width:100,align:'left'},
                       {field:'fujian',title:'附件',type:'file',width:110,align:'left'},
                       {field:'cc_bdate',title:'出差起时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'cc_edate',title:'出差止时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'t_num',title:'天数',type:'decimal',width:80,hidden:true,align:'left'},
                       {field:'r_num',title:'人数',type:'int',width:80,hidden:true,align:'left'},
                       {field:'b_dd',title:'起地',type:'string',width:220,hidden:true,align:'left'},
                       {field:'e_dd',title:'止地',type:'string',width:220,hidden:true,align:'left'},
                       {field:'bz_je',title:'补助金',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'jt_tax',title:'交通费-税金',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'jt_je',title:'交通费-金额(不含税)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'zz_tax',title:'住宿费-税金',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'zz_je',title:'住宿费-金额(不含税)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'other_tax',title:'其他费-税金',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'other_je',title:'其他费-金额(不含税)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'tick_type',title:'发票类别',type:'string',bind:{ key:'pj_typelist',data:[]},width:120,hidden:true,align:'left'},
                       {field:'jk_content',title:'扣减事项',type:'string',width:220,hidden:true,align:'left'},
                       {field:'jk_je',title:'扣减金额(含税)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'check_je',title:'审核金额(含税)',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'remark',title:'备注',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
